package org.hdax.dm.entity.es.item;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import java.util.Date;


@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "dm_item", type = "item")
public class Dmitem {
    @Id
    private Integer id;

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String itemname;

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String abstractmessage;

    @Field(type = FieldType.Integer)
    private Integer itemtype1id;
    @Field(type = FieldType.Keyword)
    private String itemtype1name;

    @Field(type = FieldType.Integer)
    private Integer itemtype2id;
    @Field(type = FieldType.Keyword)
    private String itemtype2name;

    @Field(type = FieldType.Date)
    private Date starttime;
    @Field(type = FieldType.Date)
    private Date endtime;

    @Field(type = FieldType.Integer)
    private Integer isrecommend;
    @Field(type = FieldType.Integer)
    private Integer isbanner;
    @Field(type = FieldType.Integer)
    private Integer state;
    @Field(type = FieldType.Integer)
    private Integer areaid;
    @Field(type = FieldType.Keyword)
    private String areaname;
    @Field(type = FieldType.Double)
    private Double minprice;
    @Field(type = FieldType.Double)
    private Double maxprice;
    @Field(type = FieldType.Text)
    private String adress;
    @Field(type = FieldType.Integer)
    private Integer latitude;
    @Field(type = FieldType.Integer)
    private Integer longitude;
}
